package com.example.comment.base.vo;

import com.example.comment.utils.PageResult;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * @author QingZeyu
 * @date 2024/5/6 11:31
 */
@Data
public class CommentVO implements Serializable {
    @ApiModelProperty(value = "主键")
    private Long id;
    /** 父评论id */
    @ApiModelProperty(value = "父评论id")
    private Long parentId;
    /** 根评论id */
    @ApiModelProperty(value = "根评论id")
    private Long rootId ;
    /** 关联id */
    @ApiModelProperty(value = "关联id")
    private Long referenceId;
    /** 用户id */
    @ApiModelProperty(value = "用户id")
    private Long userId;
    /** 回复用户id */
    @ApiModelProperty(value = "回复用户id")
    private Long toUserId;
    /** 评论内容 */
    @ApiModelProperty(value = "评论内容")
    private String content;
    /** 图片链接 */
    @ApiModelProperty(value = "图片链接")
    private String pictureUrl;
    /** 评论类型 */
    @ApiModelProperty(value = "评论类型")
    private String type;
    /** 审核状态 */
    @ApiModelProperty(value = "审核状态")
    private String auditStatus ;
    /** 审核人 */
    @ApiModelProperty(value = "审核人")
    private Long  auditBy ;
    /** 审核时间 */
    @ApiModelProperty(value = "审核时间")
    private Date auditTime ;
    /** 显示状态 */
    @ApiModelProperty(value = "显示状态")
    private Boolean showStatus;
    /** 创建人 */
    @ApiModelProperty(value = "创建人")
    private Long createBy;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private Date createTime ;

    @ApiModelProperty(value = "是否点赞")
    private Boolean likeFlag;

    @ApiModelProperty(value = "点赞数量")
    private Long likeSize;

    @ApiModelProperty(value = "回复评论列表")
    private PageResult<CommentReplyVO> replyList;

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class CommentReplyVO extends CommentVO {

    }
}
